package mobileann.mafamily.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import android.text.TextUtils;

public class PhoneNumUtil {
	public static boolean isMobileNo(String telStr){
		if(TextUtils.isEmpty(telStr)){
			return false;
		}
		String reg = "^((13[0-9])|(15[0-9])|(18[0-9])|(17[0678])|(14[0-9]))\\d{8}$";
		Pattern p = Pattern.compile(reg);
		Matcher m = p.matcher(telStr);
		return m.matches();
	}
	
	public static String deleteHead(String getStr){
		String tel = "";
		if(getStr.contains("+86")){
//			tel = getStr.substring(3, getStr.length());
			tel = getStr.replaceFirst("\\+86", "");
		}else{
			tel = getStr;
		}
		return tel;
	}
}
